﻿using System;
using System.Data.Entity;
using System.Linq;

namespace Common
{
    public static class DbSetExtension
    {
        public static void Dump<T>(this DbSet<T> source, 
            string message) where T : class
        {
            Console.WriteLine(message);
            foreach (var e in source)
            {
                Console.Write("{0}\t",e);
            }
            Console.WriteLine();
        }

    }
}